package com.itheima.api.suanfa;

public class jiecheng {
    public static void main(String[] args) {
        int num=5;
        int result=getJC(num);
        System.out.println(result);
    }

    private static int getJC(int num) {
        if (num==1){
            return 1;
        }else{
            return num*getJC(num-1);
        }
    }
}
